// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI from 'element-ui'
import { VueEditor } from 'vue2-editor'
// 导入公用组件
import tmTable from '@/components/table'
import xnzwSelect from '@/components/select'
import xnzwDialog from '@/components/dialog'

import 'element-ui/lib/theme-chalk/index.css'
// 导入css，此css存放的是全局项目需要的css
import '@/assets/default.css'
// 导入store 状态管理
import store from '@/vuex/store'

// import mock.js 导入所有需要mock的数据js，分模块
require('./mock/mock.js')
require('./mock/topo/netWorkTopo/netWorkTopo.js')
require('./mock/topo/opStatusDis/opStatusDis.js')
require('./mock/topo/faultWaringPre/faultWaringPre.js')
require('./mock/faultWarning/alermFalMon/alermFalMon.js')
require('./mock/faultWarning/remoteMai/remoteMai.js')
require('./mock/faultWarning/faultAidDis/faultAidDis.js')
require('./mock/faultWarning/historyFauQue/historyFauQue.js')
require('./mock/qualityAnalysis/performaceMea/performaceMea.js')
require('./mock/qualityAnalysis/targetHandle/targetHandle.js')
require('./mock/qualityAnalysis/targetAna/targetAna.js')
require('./mock/system/user/user.js')
require('./mock/system/role/role.js')
require('./mock/system/power/power.js')
require('./mock/system/safe/safe.js')
require('./mock/system/organizationMai/organizationMai.js')
require('./mock/system/geographyMai/geographyMai.js')
require('./mock/system/business/business.js')
require('./mock/system/agent/agent.js')
require('./mock/system/operation/operation.js')
require('./mock/system/log/log.js')


Vue.config.productionTip = false
Vue.use(ElementUI)
// 注册全局组件
Vue.component('xnzw-table', tmTable)
Vue.component('xnzw-select', xnzwSelect)
Vue.component('xnzw-dialog', xnzwDialog)
Vue.component('vue-editor', VueEditor)

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: {App},
  template: '<App/>'
})
Vue.filter('getYMD', function (input) {
  return input.split(' ')[0]
})
